<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-errorcode-add">
			<input id="apiProjectnameId" name="apiProjectnameId" type="hidden" th:value="${project.apiProjectnameId}"   />
			<div class="form-group">
				<label class="col-sm-3 control-label">所属项目：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" id="treeName" readonly="true" th:value="${project.description}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">错误代码编号：</label>
				<div class="col-sm-8">
					<input id="errorcode" name="errorcode" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">前端提示：</label>
				<div class="col-sm-8">
					<input id="description" name="description" class="form-control" type="text" value="服务端处理错误">
				</div>
			</div>
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">创建者：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="createBy" name="createBy" class="form-control" type="text" readonly="true">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">创建时间：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="createTime" name="createTime" class="form-control" type="text" readonly="true">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">更新者：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="updateBy" name="updateBy" class="form-control" type="text" readonly="true">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">更新时间：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="updateTime" name="updateTime" class="form-control" type="text" readonly="true">-->
				<!--</div>-->
			<!--</div>-->
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<div class="form-control-static col-sm-offset-9">
					<button type="submit" class="btn btn-primary">提交</button>
					<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "module/errorcode"
		$("#form-errorcode-add").validate({
			rules:{
				errorcode:{
                    required:true,
                    digits:true,
				},
                description:{
                    required:true,
                },
			},
			submitHandler: function(form) {
                var data = $('#form-errorcode-add').serialize();
                console.log(data);
                $.operate.save(prefix + "/add", data);
			}
		});
	</script>
</body>
</html>
